package com.xiaoma.weblog.common.domain.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaoma.weblog.common.domain.dos.ArticleContentDO;

/**
 * @ClassName ArticleContentMapper
 * @Description:
 * @Author: 小马
 * @CreateDate: 2025/3/28 14:15
 * @Version: 1.0
 */
public interface ArticleContentMapper extends BaseMapper<ArticleContentDO> {

    default ArticleContentDO selectByArticleId(Long articleId) {
        LambdaQueryWrapper<ArticleContentDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(ArticleContentDO::getArticleId, articleId);
        return selectOne(lambdaQueryWrapper);
    }

}
